<h1>Listing sales</h1>

<table>
  <tr>
    <th>Client</th>
    <th>Product</th>
    <th>Date</th>
    <th>Price</th>
    <th>Quantity</th>
  </tr>

<% for sale in @sales %>
  <tr>
    <td><%=h sale.client %></td>
    <td><%=h sale.product %></td>
    <td><%=h sale.date %></td>
    <td><%=h sale.price %></td>
    <td><%=h sale.quantity %></td>
    <td><%= link_to 'Show', sale %></td>
    <td><%= link_to 'Edit', edit_sale_path(sale) %></td>
    <td><%= link_to 'Destroy', sale, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New sale', new_sale_path %>
